//本客服系统JS，由赵云开发，复制请保留版权。
//已经申请计算机著作权，我们有依法追究相关侵权的权利。
//合作电话：18221942056   
var kefu =[ 
// {id:"xiaobei",name:"小贝",QQ:"",weixin:"wx18050111304",tel:"18050111304",wximg:"http://www.cmysb.top/images/xiaobei.png ",nicheng:"美女",sex:"她"},
// {id:"qingqing",name:"晴晴",QQ:"",weixin:"TX10133",tel:"18050111334",wximg:"http://www.cmysb.top/images/qinqin.png",nicheng:"美女",sex:"她"},
{id:"chenchen",name:"晨晨",QQ:"",weixin:"wx18050111374",tel:"18050111374",wximg:"http://www.cmysb.top/images/chenchen.png",nicheng:"美女",sex:"她"},
// {id:"xiaozhen",name:"小郑",QQ:"",weixin:"shanzi---G",tel:"18050111340",wximg:"http://www.cmysb.top/images/xiaozhen.png",nicheng:"美女",sex:"男"},
];

var kefuIndex;
var urlArr = window.location.href.toLowerCase().split('#');
var kefuInfo = $.cookie("kefusys101_52");
if(!kefuInfo){
	if(urlArr.length > 1){
		for(var i=0;i<kefu.length;i++){
			if(kefu[i].id == urlArr[urlArr.length-1]){
				kefuIndex = i;
				break;
			}
		}
		if(!kefuIndex){
			kefuIndex = Math.floor(Math.random()*kefu.length);
		}
	}else{
		kefuIndex = Math.floor(Math.random()*kefu.length);
	}
	kefuInfo = kefu[kefuIndex];
	$.cookie('kefusys101_52',JSON.stringify(kefuInfo),{expires: 360});
}else{
	kefuInfo = JSON.parse(kefuInfo);
}
history.replaceState({id:kefuInfo.id},document.title,"#"+kefuInfo.id);

$(function(){
	$(".kefuName").text(kefuInfo.name);
	$(".kefuTel").text(kefuInfo.tel);
	$(".kefuSex").text(kefuInfo.sex);
	$(".kefuQQ").text(kefuInfo.QQ);
	$(".kefuWx").text(kefuInfo.weixin);
	$(".kefuniCheng").text(kefuInfo.nicheng);
	$(".kefuImg").attr('src',kefuInfo.wximg);
	$(".kefuBoda").attr('href',"tel:"+kefuInfo.tel);
	$(".kefuBoda").text(kefuInfo.tel);
});